﻿using System;
using System.Collections.Generic;
using System.Drawing.Drawing2D;
using System.Linq;
using Autodesk.Revit.ApplicationServices;
using Autodesk.Revit.DB;
using StairsModuleAndEdit.StairsModel.CommonUnit;
using StairsModuleAndEdit.StairsModel.DataInfos;

namespace StairsModuleAndEdit.StairsModel.Kit
{
	public class RectangleAngleStairsKit : ProjectionDrawingKit
	{
		public RectangleAngleStairsKit(Application app) : base(app)
		{
		}

		public bool RectangleAngleStairsProfileCurves(ref RectangleAngleStairs stairs, bool bDrawNoteInfo, int basePointIndex, bool lrMirror, bool tbMirror, bool bClockwiseUp, double rotateAngle, bool bBottom, bool bMid, bool bLand, bool bTop)
		{
			bool result = true;
			LineRunData lineRunData = stairs.m_listRunData[0];
			LineRunData lineRunData2 = stairs.m_listRunData[1];
			LineRunData lineRunData3 = null;
			LineRunData lineRunData4 = null;
			int nRunCount = stairs.m_nRunCount;
			if (stairs.m_listRunData.Count > 2)
			{
				lineRunData3 = stairs.m_listRunData[2];
			}
			if (stairs.m_listRunData.Count > 3)
			{
				lineRunData4 = stairs.m_listRunData[3];
			}
			double dStairsLength = stairs.m_dStairsLength;
			double dStairsWidth = stairs.m_dStairsWidth;
			double num = stairs.m_dStairsWidth - lineRunData2.RunWidth - lineRunData.RunLength;
			double num2 = stairs.m_dStairsLength - lineRunData.RunWidth - lineRunData2.RunLength;
			if (nRunCount == 3)
			{
				num2 = (stairs.m_dStairsLength - lineRunData.RunWidth - lineRunData3.RunWidth - lineRunData2.RunLength) / 2.0;
			}
			else if (nRunCount == 4)
			{
				num2 = (stairs.m_dStairsLength - lineRunData.RunWidth - lineRunData3.RunWidth - lineRunData2.RunLength) / 2.0;
				num = (stairs.m_dStairsWidth - lineRunData2.RunWidth - lineRunData4.RunWidth - lineRunData.RunLength) / 2.0;
			}
			num2 = Math.Abs(num2);
			num = Math.Abs(num);
			int num3 = basePointIndex;
			List<XYZ> list = new List<XYZ>();
			XYZ zero = XYZ.Zero;
			XYZ ptRunBottomRight = new XYZ(lineRunData.RunWidth, 0.0, 0.0);
			XYZ xyz = new XYZ(0.0, lineRunData.RunLength, 0.0);
			XYZ xyz2 = new XYZ(lineRunData.RunWidth, lineRunData.RunLength, 0.0);
			XYZ xyz3 = new XYZ(0.0, num, 0.0);
			XYZ xyz4 = xyz2 + xyz3;
			xyz3 = new XYZ(0.0, lineRunData2.RunWidth + num, 0.0);
			XYZ xyz5 = xyz + xyz3;
			XYZ xyz6 = xyz4 + new XYZ(num2, 0.0, 0.0);
			XYZ xyz7 = xyz6 + new XYZ(0.0, lineRunData2.RunWidth, 0.0);
			XYZ xyz8 = new XYZ(lineRunData2.RunLength, 0.0, 0.0);
			XYZ xyz9 = xyz7 + xyz8;
			XYZ xyz10 = xyz6 + xyz8;
			stairs.m_listRunData[0].PtRunBottomLeft = zero;
			stairs.m_listRunData[0].PtRunBottomRight = ptRunBottomRight;
			stairs.m_listRunData[0].PtRunTopLeft = xyz;
			stairs.m_listRunData[0].PtRunTopRight = xyz2;
			stairs.m_listRunData[1].PtRunBottomLeft = xyz7;
			stairs.m_listRunData[1].PtRunBottomRight = xyz6;
			stairs.m_listRunData[1].PtRunTopLeft = xyz9;
			stairs.m_listRunData[1].PtRunTopRight = xyz10;
			stairs.m_listPointsSupport.Add(zero);
			stairs.m_listPointsSupport.Add(xyz);
			stairs.m_listPointsSupport.Add(xyz5);
			stairs.m_listPointsSupport.Add(xyz7);
			stairs.m_listPointsSupport.Add(xyz9);
			list.Add(zero);
			list.Add(xyz5);
			list.Add(xyz9);
			XYZ xyz11 = new XYZ(num2, 0.0, 0.0);
			XYZ xyz12 = XYZ.Zero;
			XYZ xyz13 = XYZ.Zero;
			XYZ xyz14 = XYZ.Zero;
			XYZ xyz15 = XYZ.Zero;
			XYZ xyz16 = XYZ.Zero;
			XYZ xyz17 = XYZ.Zero;
			if (lineRunData3 != null)
			{
				double num4 = stairs.m_dStairsWidth - lineRunData2.RunWidth - lineRunData3.RunLength;
				if (nRunCount == 4)
				{
					num4 = (stairs.m_dStairsWidth - lineRunData2.RunWidth - lineRunData4.RunWidth - lineRunData3.RunLength) / 2.0;
				}
				XYZ xyz18 = new XYZ(lineRunData3.RunWidth, 0.0, 0.0);
				xyz12 = xyz10 + xyz11;
				xyz13 = xyz9 + xyz11 + xyz18;
				XYZ xyz19 = new XYZ(0.0, num4, 0.0);
				xyz14 = xyz12 - xyz19;
				XYZ xyz20 = new XYZ(lineRunData3.RunWidth, 0.0, 0.0);
				XYZ xyz21 = new XYZ(0.0, lineRunData3.RunLength, 0.0);
				xyz15 = xyz14 + xyz20;
				xyz17 = xyz15 - xyz21;
				xyz16 = xyz14 - xyz21;
				stairs.m_listRunData[2].PtRunBottomLeft = xyz15;
				stairs.m_listRunData[2].PtRunBottomRight = xyz14;
				stairs.m_listRunData[2].PtRunTopLeft = xyz17;
				stairs.m_listRunData[2].PtRunTopRight = xyz16;
				stairs.m_listPointsSupport.Clear();
				stairs.m_listPointsSupport.Add(zero);
				stairs.m_listPointsSupport.Add(xyz);
				stairs.m_listPointsSupport.Add(xyz5);
				stairs.m_listPointsSupport.Add(xyz7);
				stairs.m_listPointsSupport.Add(xyz9);
				stairs.m_listPointsSupport.Add(xyz13);
				stairs.m_listPointsSupport.Add(xyz15);
				stairs.m_listPointsSupport.Add(xyz17);
				list.Clear();
				list.Add(zero);
				list.Add(xyz5);
				list.Add(xyz13);
				list.Add(xyz17);
			}
			XYZ xyz22 = XYZ.Zero;
			XYZ xyz23 = XYZ.Zero;
			XYZ ptLandInSide = XYZ.Zero;
			XYZ xyz24 = XYZ.Zero;
			XYZ xyz25 = XYZ.Zero;
			XYZ xyz26 = XYZ.Zero;
			XYZ xyz27 = XYZ.Zero;
			XYZ xyz28 = XYZ.Zero;
			if (lineRunData4 != null)
			{
				double num5 = (stairs.m_dStairsWidth - lineRunData2.RunWidth - lineRunData4.RunWidth - lineRunData3.RunLength) / 2.0;
				double num6 = (stairs.m_dStairsLength - lineRunData.RunWidth - lineRunData3.RunWidth - lineRunData4.RunLength) / 2.0;
				num5 = Math.Abs(num5);
				num6 = Math.Abs(num6);
				XYZ xyz29 = new XYZ(0.0, -num5, 0.0);
				xyz22 = xyz16 + xyz29;
				XYZ xyz30 = new XYZ(0.0, -num5 - lineRunData4.RunWidth, 0.0);
				xyz23 = xyz17 + xyz30;
				XYZ xyz31 = new XYZ(-num6, 0.0, 0.0);
				xyz25 = xyz22 + xyz31;
				XYZ xyz32 = new XYZ(0.0, -lineRunData4.RunWidth, 0.0);
				XYZ xyz33 = new XYZ(-lineRunData4.RunLength, 0.0, 0.0);
				xyz26 = xyz25 + xyz32;
				xyz28 = xyz26 + xyz33;
				xyz27 = xyz25 + xyz33;
				ptLandInSide = xyz27 + xyz31;
				XYZ xyz34 = new XYZ(-num6 - lineRunData.RunWidth, 0.0, 0.0);
				xyz24 = xyz28 + xyz34;
				stairs.m_listRunData[3].PtRunBottomLeft = xyz26;
				stairs.m_listRunData[3].PtRunBottomRight = xyz25;
				stairs.m_listRunData[3].PtRunTopLeft = xyz28;
				stairs.m_listRunData[3].PtRunTopRight = xyz27;
				stairs.m_listPointsSupport.Clear();
				stairs.m_listPointsSupport.Add(zero);
				stairs.m_listPointsSupport.Add(xyz);
				stairs.m_listPointsSupport.Add(xyz5);
				stairs.m_listPointsSupport.Add(xyz7);
				stairs.m_listPointsSupport.Add(xyz9);
				stairs.m_listPointsSupport.Add(xyz13);
				stairs.m_listPointsSupport.Add(xyz15);
				stairs.m_listPointsSupport.Add(xyz17);
				stairs.m_listPointsSupport.Add(xyz23);
				stairs.m_listPointsSupport.Add(xyz26);
				stairs.m_listPointsSupport.Add(xyz28);
				stairs.m_listPointsSupport.Add(xyz24);
				list.Clear();
				list.Add(xyz5);
				list.Add(xyz13);
				list.Add(xyz23);
			}
			if (num3 >= list.Count)
			{
				num3 = list.Count - 1;
			}
			XYZ xyz35 = list[num3];
			base.CalulateTransform(lrMirror, tbMirror, rotateAngle, dStairsLength, dStairsWidth, xyz35);
			stairs.m_TransVector = Geometry.TransformPoint(xyz35, this.m_Transform);
			stairs.m_listOtherCurve.AddRange(base.DrawBasePoint(xyz35, 100.0));
			stairs.m_Transform = this.m_Transform;
			if (bDrawNoteInfo)
			{
				XYZ xyz36 = (lineRunData.PtRunBottomLeft + lineRunData.PtRunBottomRight) / 2.0 - XYZ.BasisY * 1.3;
				XYZ xyz37;
				if (2 == stairs.m_nRunCount)
				{
					xyz37 = (lineRunData2.PtRunTopLeft + lineRunData2.PtRunTopRight) / 2.0 + XYZ.BasisX * 1.3;
				}
				else if (3 == stairs.m_nRunCount)
				{
					xyz37 = (lineRunData3.PtRunTopLeft + lineRunData3.PtRunTopRight) / 2.0 - XYZ.BasisY * 1.3;
				}
				else
				{
					xyz37 = (lineRunData4.PtRunTopLeft + lineRunData4.PtRunTopRight) / 2.0 - XYZ.BasisX * 1.3;
				}
				xyz36 = Geometry.TransformPoint(xyz36, this.m_Transform);
				xyz37 = Geometry.TransformPoint(xyz37, this.m_Transform);
				if (bClockwiseUp)
				{
					string text = "上";
					TextNoteInfo item = new TextNoteInfo(text, PenColor.PC_Black, (double)text.Length, xyz36, (double)text.Length, (double)text.Length * 1.5);
					stairs.m_listText.Add(item);
					text = "下";
					TextNoteInfo item2 = new TextNoteInfo(text, PenColor.PC_Black, (double)text.Length, xyz37, (double)text.Length, (double)text.Length * 1.5);
					stairs.m_listText.Add(item2);
				}
				else
				{
					string text2 = "上";
					TextNoteInfo item3 = new TextNoteInfo(text2, PenColor.PC_Black, (double)text2.Length, xyz37, (double)text2.Length, (double)text2.Length * 1.5);
					stairs.m_listText.Add(item3);
					text2 = "下";
					TextNoteInfo item4 = new TextNoteInfo(text2, PenColor.PC_Black, (double)text2.Length, xyz36, (double)text2.Length, (double)text2.Length * 1.5);
					stairs.m_listText.Add(item4);
				}
			}
			this.DrawRectangleStairsRunCurves(ref stairs, bClockwiseUp, bDrawNoteInfo);
			this.DrawRectangleStairsLandCurves(ref stairs, bClockwiseUp, xyz4, xyz5, xyz12, xyz13, xyz22, xyz23, ptLandInSide, xyz24);
			this.DrawRectangleStairsBeamCurves(ref stairs, bClockwiseUp, xyz5, xyz13, xyz23, xyz24, bBottom, bMid, bLand, bTop);
			if (2 == stairs.m_nRunCount)
			{
				this.DrawRectangleAngleStarisNoteInfo(ref stairs, bClockwiseUp, xyz5, null, null, null);
			}
			else if (3 == stairs.m_nRunCount)
			{
				this.DrawRectangleAngleStarisNoteInfo(ref stairs, bClockwiseUp, xyz5, xyz13, null, null);
			}
			else
			{
				this.DrawRectangleAngleStarisNoteInfo(ref stairs, bClockwiseUp, xyz5, xyz13, xyz23, xyz24);
			}
			return result;
		}

		private void DrawRectangleStairsRunCurves(ref RectangleAngleStairs param_stairs, bool bClockwiseUp, bool bDrawNoteInfo)
		{
			if (param_stairs != null)
			{
				if (bClockwiseUp)
				{
					using (List<LineRunData>.Enumerator enumerator = param_stairs.m_listRunData.GetEnumerator())
					{
						while (enumerator.MoveNext())
						{
							LineRunData lineRunData = enumerator.Current;
							SingleRunCurveInfo singleRunCurveInfo = new SingleRunCurveInfo();
							singleRunCurveInfo.BottomElevation = lineRunData.BottomElevation;
							base.DrawLinearRun(lineRunData, lineRunData.PtRunBottomLeft, lineRunData.PtRunBottomRight, lineRunData.PtRunTopRight, lineRunData.PtRunTopLeft, ref singleRunCurveInfo, ref param_stairs.m_listOtherCurve, bDrawNoteInfo);
							param_stairs.m_listRunCurve.Add(singleRunCurveInfo);
						}
						return;
					}
				}
				for (int i = param_stairs.m_listRunData.Count - 1; i >= 0; i--)
				{
					LineRunData lineRunData2 = param_stairs.m_listRunData[i];
					SingleRunCurveInfo singleRunCurveInfo2 = new SingleRunCurveInfo();
					singleRunCurveInfo2.BottomElevation = lineRunData2.BottomElevation;
					base.DrawLinearRun(lineRunData2, lineRunData2.PtRunTopRight, lineRunData2.PtRunTopLeft, lineRunData2.PtRunBottomLeft, lineRunData2.PtRunBottomRight, ref singleRunCurveInfo2, ref param_stairs.m_listOtherCurve, bDrawNoteInfo);
					param_stairs.m_listRunCurve.Add(singleRunCurveInfo2);
				}
			}
		}

		private void DrawRectangleStairsLandCurves(ref RectangleAngleStairs param_stairs, bool bClockwiseUp, XYZ ptLandInSide0, XYZ ptLandOutSide0, XYZ ptLandInSide1, XYZ ptLandOutSide1, XYZ ptLandInSide2, XYZ ptLandOutSide2, XYZ ptLandInSide3, XYZ ptLandOutSide3)
		{
			if (param_stairs != null)
			{
				Common.MMToFeet(1.0);
				Common.MMToFeet(15.0);
				if (param_stairs.m_nRunCount == 2)
				{
					LineRunData lineRunData = param_stairs.m_listRunData[0];
					LineRunData lineRunData2 = param_stairs.m_listRunData[1];
					List<CurveInfo> landCurves = base.CreateLandEdgeloop(new List<XYZ>
					{
						lineRunData.PtRunTopLeft,
						ptLandOutSide0,
						lineRunData2.PtRunBottomLeft,
						lineRunData2.PtRunBottomRight,
						ptLandInSide0,
						lineRunData.PtRunTopRight
					});
					double bottomElevation = 0.0;
					LandingCurveInfo item = new LandingCurveInfo(landCurves, bottomElevation);
					param_stairs.m_listLandCurve.Add(item);
					return;
				}
				if (param_stairs.m_nRunCount == 3)
				{
					LineRunData lineRunData3 = param_stairs.m_listRunData[0];
					LineRunData lineRunData4 = param_stairs.m_listRunData[1];
					LineRunData lineRunData5 = param_stairs.m_listRunData[2];
					List<XYZ> list = new List<XYZ>();
					list.Add(lineRunData3.PtRunTopLeft);
					list.Add(ptLandOutSide0);
					list.Add(lineRunData4.PtRunBottomLeft);
					list.Add(lineRunData4.PtRunBottomRight);
					list.Add(ptLandInSide0);
					list.Add(lineRunData3.PtRunTopRight);
					List<CurveInfo> landCurves2 = base.CreateLandEdgeloop(list);
					double bottomElevation2 = 0.0;
					LandingCurveInfo item2 = new LandingCurveInfo(landCurves2, bottomElevation2);
					param_stairs.m_listLandCurve.Add(item2);
					list.Clear();
					list.Add(lineRunData4.PtRunTopLeft);
					list.Add(ptLandOutSide1);
					list.Add(lineRunData5.PtRunBottomLeft);
					list.Add(lineRunData5.PtRunBottomRight);
					list.Add(ptLandInSide1);
					list.Add(lineRunData4.PtRunTopRight);
					landCurves2 = base.CreateLandEdgeloop(list);
					bottomElevation2 = 0.0;
					item2 = new LandingCurveInfo(landCurves2, bottomElevation2);
					param_stairs.m_listLandCurve.Add(item2);
					if (!bClockwiseUp)
					{
						LandingCurveInfo value = param_stairs.m_listLandCurve[0];
						param_stairs.m_listLandCurve[0] = param_stairs.m_listLandCurve[1];
						param_stairs.m_listLandCurve[1] = value;
						return;
					}
				}
				else if (param_stairs.m_nRunCount == 4)
				{
					LineRunData lineRunData6 = param_stairs.m_listRunData[0];
					LineRunData lineRunData7 = param_stairs.m_listRunData[1];
					LineRunData lineRunData8 = param_stairs.m_listRunData[2];
					LineRunData lineRunData9 = param_stairs.m_listRunData[3];
					List<XYZ> list2 = new List<XYZ>();
					list2.Add(lineRunData6.PtRunTopLeft);
					list2.Add(ptLandOutSide0);
					list2.Add(lineRunData7.PtRunBottomLeft);
					list2.Add(lineRunData7.PtRunBottomRight);
					list2.Add(ptLandInSide0);
					list2.Add(lineRunData6.PtRunTopRight);
					List<CurveInfo> landCurves3 = base.CreateLandEdgeloop(list2);
					double bottomElevation3 = 0.0;
					LandingCurveInfo item3 = new LandingCurveInfo(landCurves3, bottomElevation3);
					param_stairs.m_listLandCurve.Add(item3);
					list2.Clear();
					list2.Add(lineRunData7.PtRunTopLeft);
					list2.Add(ptLandOutSide1);
					list2.Add(lineRunData8.PtRunBottomLeft);
					list2.Add(lineRunData8.PtRunBottomRight);
					list2.Add(ptLandInSide1);
					list2.Add(lineRunData7.PtRunTopRight);
					landCurves3 = base.CreateLandEdgeloop(list2);
					bottomElevation3 = 0.0;
					item3 = new LandingCurveInfo(landCurves3, bottomElevation3);
					param_stairs.m_listLandCurve.Add(item3);
					list2.Clear();
					list2.Add(lineRunData8.PtRunTopLeft);
					list2.Add(ptLandOutSide2);
					list2.Add(lineRunData9.PtRunBottomLeft);
					list2.Add(lineRunData9.PtRunBottomRight);
					list2.Add(ptLandInSide2);
					list2.Add(lineRunData8.PtRunTopRight);
					landCurves3 = base.CreateLandEdgeloop(list2);
					bottomElevation3 = 0.0;
					item3 = new LandingCurveInfo(landCurves3, bottomElevation3);
					param_stairs.m_listLandCurve.Add(item3);
					if (!bClockwiseUp)
					{
						LandingCurveInfo value2 = param_stairs.m_listLandCurve[0];
						param_stairs.m_listLandCurve[0] = param_stairs.m_listLandCurve[2];
						param_stairs.m_listLandCurve[2] = value2;
					}
				}
			}
		}

		private void DrawRectangleStairsBeamCurves(ref RectangleAngleStairs param_stairs, bool bClockwiseUp, XYZ ptLandOutSide0, XYZ ptLandOutSide1, XYZ ptLandOutSide2, XYZ ptLandOutSide3, bool bBottom, bool bMid, bool bLand, bool bTop)
		{
			if (param_stairs != null)
			{
				if (bBottom)
				{
					this.CreateRectangleAngleStairsBottomBeamCurves(ref param_stairs, bClockwiseUp);
				}
				if (bMid)
				{
					this.CreateRectangleAngleStarisMidBeamCurves(ref param_stairs, bClockwiseUp);
				}
				if (bLand)
				{
					this.CreateRectangleAngleStarisLandBeamCurves(ref param_stairs, bClockwiseUp, ptLandOutSide0, ptLandOutSide1, ptLandOutSide2, ptLandOutSide3);
				}
				if (bTop)
				{
					this.CreateRectangleAngleStarisTopBeamCurves(ref param_stairs, bClockwiseUp);
				}
			}
		}

		private void CreateRectangleAngleStairsBottomBeamCurves(ref RectangleAngleStairs rectStairs, bool bClockwiseUp)
		{
			double num = rectStairs.m_BeamData.BeamWidth / 2.0;
			if (bClockwiseUp)
			{
				LineRunData lineRunData = rectStairs.m_listRunData[0];
				XYZ xyz = new XYZ(0.0, num, 0.0);
				List<CurveInfo> list = new List<CurveInfo>();
				XYZ ptS = lineRunData.PtRunBottomLeft - xyz;
				XYZ ptE = lineRunData.PtRunBottomRight - xyz;
				list.Add(base.NewLine(PenColor.PC_Gray, DashStyle.Solid, 1f, ptS, ptE, null));
				double bottomElevation = lineRunData.BottomElevation;
				BeamCurveInfo beamCurveInfo = new BeamCurveInfo(list, bottomElevation);
				beamCurveInfo.m_Type = BeamType.BT_Bottom;
				beamCurveInfo.m_nFloorNum = 0;
				rectStairs.m_listBeamCurve.Add(beamCurveInfo);
				return;
			}
			int index = rectStairs.m_nRunCount - 1;
			int nRunCount = rectStairs.m_nRunCount;
			LineRunData lineRunData2 = rectStairs.m_listRunData[index];
			XYZ xyz2 = new XYZ(num, 0.0, 0.0);
			if (nRunCount == 3)
			{
				xyz2 = new XYZ(0.0, -num, 0.0);
			}
			else if (nRunCount == 4)
			{
				xyz2 = new XYZ(-num, 0.0, 0.0);
			}
			List<CurveInfo> list2 = new List<CurveInfo>();
			XYZ ptS2 = lineRunData2.PtRunTopLeft + xyz2;
			XYZ ptE2 = lineRunData2.PtRunTopRight + xyz2;
			list2.Add(base.NewLine(PenColor.PC_Gray, DashStyle.Solid, 1f, ptS2, ptE2, null));
			double bottomElevation2 = lineRunData2.BottomElevation;
			BeamCurveInfo beamCurveInfo2 = new BeamCurveInfo(list2, bottomElevation2);
			beamCurveInfo2.m_Type = BeamType.BT_Bottom;
			beamCurveInfo2.m_nFloorNum = 0;
			rectStairs.m_listBeamCurve.Add(beamCurveInfo2);
		}

		private void CreateRectangleAngleStarisTopBeamCurves(ref RectangleAngleStairs rectStairs, bool bClockwiseUp)
		{
			double num = rectStairs.m_BeamData.BeamWidth / 2.0;
			int index = rectStairs.m_nRunCount - 1;
			int nRunCount = rectStairs.m_nRunCount;
			if (bClockwiseUp)
			{
				LineRunData lineRunData = rectStairs.m_listRunData[index];
				XYZ xyz = XYZ.Zero;
				if (nRunCount == 2)
				{
					xyz = new XYZ(num, 0.0, 0.0);
				}
				else if (nRunCount == 3)
				{
					xyz = new XYZ(0.0, -num, 0.0);
				}
				else if (nRunCount == 4)
				{
					lineRunData = rectStairs.m_listRunData[0];
					xyz = new XYZ(0.0, -num, 0.0);
				}
				List<CurveInfo> list = new List<CurveInfo>();
				XYZ ptS = lineRunData.PtRunTopLeft + xyz;
				XYZ ptE = lineRunData.PtRunTopRight + xyz;
				if (nRunCount == 4)
				{
					ptS = lineRunData.PtRunBottomLeft + xyz;
					ptE = lineRunData.PtRunBottomRight + xyz;
				}
				list.Add(base.NewLine(PenColor.PC_Gray, DashStyle.Solid, 1f, ptS, ptE, null));
				double bottomElevation = lineRunData.BottomElevation;
				BeamCurveInfo beamCurveInfo = new BeamCurveInfo(list, bottomElevation);
				beamCurveInfo.m_Type = BeamType.BT_Top;
				beamCurveInfo.m_nFloorNum = 0;
				rectStairs.m_listBeamCurve.Add(beamCurveInfo);
				return;
			}
			LineRunData lineRunData2 = rectStairs.m_listRunData[index];
			XYZ xyz2 = new XYZ(-num, 0.0, 0.0);
			if (nRunCount == 2 || nRunCount == 3)
			{
				lineRunData2 = rectStairs.m_listRunData[0];
				xyz2 = new XYZ(0.0, -num, 0.0);
			}
			List<CurveInfo> list2 = new List<CurveInfo>();
			XYZ ptS2 = lineRunData2.PtRunTopLeft + xyz2;
			XYZ ptE2 = lineRunData2.PtRunTopRight + xyz2;
			if (nRunCount == 2 || nRunCount == 3)
			{
				ptS2 = lineRunData2.PtRunBottomLeft + xyz2;
				ptE2 = lineRunData2.PtRunBottomRight + xyz2;
			}
			list2.Add(base.NewLine(PenColor.PC_Gray, DashStyle.Solid, 1f, ptS2, ptE2, null));
			double bottomElevation2 = lineRunData2.BottomElevation;
			BeamCurveInfo beamCurveInfo2 = new BeamCurveInfo(list2, bottomElevation2);
			beamCurveInfo2.m_Type = BeamType.BT_Top;
			beamCurveInfo2.m_nFloorNum = 0;
			rectStairs.m_listBeamCurve.Add(beamCurveInfo2);
		}

		private void CreateRectangleAngleStarisMidBeamCurves(ref RectangleAngleStairs rectStairs, bool bClockwiseUp)
		{
			List<BeamCurveInfo> list = new List<BeamCurveInfo>();
			double num = rectStairs.m_BeamData.BeamWidth / 2.0;
			int nRunCount = rectStairs.m_nRunCount;
			int nRunCount2 = rectStairs.m_nRunCount;
			LineRunData lineRunData = rectStairs.m_listRunData[0];
			LineRunData lineRunData2 = rectStairs.m_listRunData[1];
			List<CurveInfo> list2 = new List<CurveInfo>();
			XYZ xyz = new XYZ(0.0, num, 0.0);
			XYZ xyz2 = new XYZ(-num, 0.0, 0.0);
			XYZ ptS = lineRunData.PtRunTopLeft + xyz;
			XYZ ptE = lineRunData.PtRunTopRight + xyz;
			XYZ normal = null;
			if (bClockwiseUp)
			{
				normal = xyz.Normalize();
			}
			list2.Add(base.NewLine(PenColor.PC_Gray, DashStyle.Solid, 1f, ptS, ptE, normal));
			ptS = lineRunData2.PtRunBottomLeft + xyz2;
			ptE = lineRunData2.PtRunBottomRight + xyz2;
			if (bClockwiseUp)
			{
				normal = null;
			}
			else
			{
				normal = xyz2.Normalize();
			}
			list2.Add(base.NewLine(PenColor.PC_Gray, DashStyle.Solid, 1f, ptS, ptE, normal));
			double bottomElevation = lineRunData.BottomElevation;
			list.Add(new BeamCurveInfo(list2, bottomElevation)
			{
				m_Type = BeamType.BT_Mid,
				m_nFloorNum = 0
			});
			if (nRunCount2 == 3)
			{
				LineRunData lineRunData3 = rectStairs.m_listRunData[1];
				LineRunData lineRunData4 = rectStairs.m_listRunData[2];
				List<CurveInfo> list3 = new List<CurveInfo>();
				XYZ xyz3 = new XYZ(num, 0.0, 0.0);
				XYZ xyz4 = new XYZ(0.0, num, 0.0);
				XYZ normal2 = null;
				XYZ ptS2 = lineRunData3.PtRunTopLeft + xyz3;
				XYZ ptE2 = lineRunData3.PtRunTopRight + xyz3;
				if (bClockwiseUp)
				{
					normal2 = xyz3.Normalize();
				}
				list3.Add(base.NewLine(PenColor.PC_Gray, DashStyle.Solid, 1f, ptS2, ptE2, normal2));
				ptS2 = lineRunData4.PtRunBottomLeft + xyz4;
				ptE2 = lineRunData4.PtRunBottomRight + xyz4;
				if (bClockwiseUp)
				{
					normal2 = null;
				}
				else
				{
					normal2 = xyz4.Normalize();
				}
				list3.Add(base.NewLine(PenColor.PC_Gray, DashStyle.Solid, 1f, ptS2, ptE2, normal2));
				double bottomElevation2 = lineRunData3.BottomElevation;
				list.Add(new BeamCurveInfo(list3, bottomElevation2)
				{
					m_Type = BeamType.BT_Mid,
					m_nFloorNum = 1
				});
				if (!bClockwiseUp)
				{
					list[0].m_nFloorNum = 1;
					list[1].m_nFloorNum = 0;
				}
			}
			else if (nRunCount2 == 4)
			{
				LineRunData lineRunData5 = rectStairs.m_listRunData[1];
				LineRunData lineRunData6 = rectStairs.m_listRunData[2];
				LineRunData lineRunData7 = rectStairs.m_listRunData[3];
				List<CurveInfo> list4 = new List<CurveInfo>();
				XYZ xyz5 = new XYZ(num, 0.0, 0.0);
				XYZ xyz6 = new XYZ(0.0, num, 0.0);
				XYZ normal3 = null;
				XYZ ptS3 = lineRunData5.PtRunTopLeft + xyz5;
				XYZ ptE3 = lineRunData5.PtRunTopRight + xyz5;
				if (bClockwiseUp)
				{
					normal3 = xyz5.Normalize();
				}
				list4.Add(base.NewLine(PenColor.PC_Gray, DashStyle.Solid, 1f, ptS3, ptE3, normal3));
				ptS3 = lineRunData6.PtRunBottomLeft + xyz6;
				ptE3 = lineRunData6.PtRunBottomRight + xyz6;
				if (bClockwiseUp)
				{
					normal3 = null;
				}
				else
				{
					normal3 = xyz6.Normalize();
				}
				list4.Add(base.NewLine(PenColor.PC_Gray, DashStyle.Solid, 1f, ptS3, ptE3, normal3));
				double bottomElevation3 = lineRunData5.BottomElevation;
				list.Add(new BeamCurveInfo(list4, bottomElevation3)
				{
					m_Type = BeamType.BT_Mid,
					m_nFloorNum = 1
				});
				list4 = new List<CurveInfo>();
				xyz5 = new XYZ(0.0, -num, 0.0);
				xyz6 = new XYZ(num, 0.0, 0.0);
				ptS3 = lineRunData6.PtRunTopLeft + xyz5;
				ptE3 = lineRunData6.PtRunTopRight + xyz5;
				if (bClockwiseUp)
				{
					normal3 = xyz5.Normalize();
				}
				else
				{
					normal3 = null;
				}
				list4.Add(base.NewLine(PenColor.PC_Gray, DashStyle.Solid, 1f, ptS3, ptE3, normal3));
				ptS3 = lineRunData7.PtRunBottomLeft + xyz6;
				ptE3 = lineRunData7.PtRunBottomRight + xyz6;
				if (bClockwiseUp)
				{
					normal3 = null;
				}
				else
				{
					normal3 = xyz6.Normalize();
				}
				list4.Add(base.NewLine(PenColor.PC_Gray, DashStyle.Solid, 1f, ptS3, ptE3, normal3));
				bottomElevation3 = lineRunData7.BottomElevation;
				list.Add(new BeamCurveInfo(list4, bottomElevation3)
				{
					m_Type = BeamType.BT_Mid,
					m_nFloorNum = 2
				});
				if (!bClockwiseUp)
				{
					list[0].m_nFloorNum = 2;
					list[2].m_nFloorNum = 0;
				}
				list4 = new List<CurveInfo>();
				if (bClockwiseUp)
				{
					ptS3 = lineRunData7.PtRunTopLeft + new XYZ(-num, 0.0, 0.0);
					ptE3 = lineRunData7.PtRunTopRight + new XYZ(-num, 0.0, 0.0);
					bottomElevation3 = lineRunData7.BottomElevation;
					normal3 = new XYZ(-num, 0.0, 0.0).Normalize();
				}
				else
				{
					LineRunData lineRunData8 = rectStairs.m_listRunData[0];
					ptS3 = lineRunData8.PtRunBottomLeft + new XYZ(0.0, -num, 0.0);
					ptE3 = lineRunData8.PtRunBottomRight + new XYZ(0.0, -num, 0.0);
					bottomElevation3 = lineRunData8.BottomElevation;
					normal3 = new XYZ(0.0, -num, 0.0).Normalize();
				}
				list4.Add(base.NewLine(PenColor.PC_Gray, DashStyle.Solid, 1f, ptS3, ptE3, normal3));
				list.Add(new BeamCurveInfo(list4, bottomElevation3)
				{
					m_Type = BeamType.BT_Mid,
					m_nFloorNum = 3
				});
			}
			rectStairs.m_listBeamCurve.AddRange(list);
		}

		private void CreateRectangleAngleStarisLandBeamCurves(ref RectangleAngleStairs rectStairs, bool bClockwiseUp, XYZ ptLandOutSide0, XYZ ptLandOutSide1, XYZ ptLandOutSide2, XYZ ptLandOutSide3)
		{
			double num = rectStairs.m_BeamData.BeamWidth / 2.0;
			int nRunCount = rectStairs.m_nRunCount;
			int nRunCount2 = rectStairs.m_nRunCount;
			XYZ ptS = XYZ.Zero;
			XYZ ptE = XYZ.Zero;
			if (bClockwiseUp)
			{
				LineRunData lineRunData = rectStairs.m_listRunData[0];
				XYZ xyz = new XYZ(num, 0.0, 0.0);
				XYZ xyz2 = new XYZ(0.0, lineRunData.RiserThickness, 0.0);
				ptS = ptLandOutSide0 + xyz;
				ptE = lineRunData.PtRunTopLeft + xyz + xyz2;
				double bottomElevation = lineRunData.BottomElevation;
				BeamCurveInfo beamCurveInfo = new BeamCurveInfo(new List<CurveInfo>
				{
					base.NewLine(PenColor.PC_Gray, DashStyle.Solid, 1f, ptS, ptE, null)
				}, bottomElevation);
				beamCurveInfo.m_Type = BeamType.BT_Land;
				beamCurveInfo.m_nFloorNum = 0;
				rectStairs.m_listBeamCurve.Add(beamCurveInfo);
				if (nRunCount2 == 3)
				{
					LineRunData lineRunData2 = rectStairs.m_listRunData[1];
					LineRunData lineRunData3 = rectStairs.m_listRunData[2];
					XYZ xyz3 = new XYZ(0.0, -num, 0.0);
					XYZ xyz4 = new XYZ(lineRunData2.RiserThickness, 0.0, 0.0);
					ptS = ptLandOutSide1 + xyz3;
					ptE = lineRunData2.PtRunTopLeft + xyz3 + xyz4;
					double bottomElevation2 = lineRunData3.BottomElevation;
					BeamCurveInfo beamCurveInfo2 = new BeamCurveInfo(new List<CurveInfo>
					{
						base.NewLine(PenColor.PC_Gray, DashStyle.Solid, 1f, ptS, ptE, null)
					}, bottomElevation2);
					beamCurveInfo2.m_Type = BeamType.BT_Land;
					beamCurveInfo2.m_nFloorNum = 1;
					rectStairs.m_listBeamCurve.Add(beamCurveInfo2);
					return;
				}
				if (nRunCount2 == 4)
				{
					LineRunData lineRunData4 = rectStairs.m_listRunData[1];
					LineRunData lineRunData5 = rectStairs.m_listRunData[2];
					LineRunData lineRunData6 = rectStairs.m_listRunData[3];
					XYZ xyz5 = new XYZ(0.0, -num, 0.0);
					XYZ xyz6 = new XYZ(lineRunData4.RiserThickness, 0.0, 0.0);
					ptS = ptLandOutSide1 + xyz5;
					ptE = lineRunData4.PtRunTopLeft + xyz5 + xyz6;
					double bottomElevation3 = lineRunData5.BottomElevation;
					BeamCurveInfo beamCurveInfo3 = new BeamCurveInfo(new List<CurveInfo>
					{
						base.NewLine(PenColor.PC_Gray, DashStyle.Solid, 1f, ptS, ptE, null)
					}, bottomElevation3);
					beamCurveInfo3.m_Type = BeamType.BT_Land;
					beamCurveInfo3.m_nFloorNum = 1;
					rectStairs.m_listBeamCurve.Add(beamCurveInfo3);
					xyz5 = new XYZ(-num, 0.0, 0.0);
					xyz6 = new XYZ(0.0, -lineRunData5.RiserThickness, 0.0);
					ptS = ptLandOutSide2 + xyz5;
					ptE = lineRunData5.PtRunTopLeft + xyz5 + xyz6;
					bottomElevation3 = lineRunData6.BottomElevation;
					beamCurveInfo3 = new BeamCurveInfo(new List<CurveInfo>
					{
						base.NewLine(PenColor.PC_Gray, DashStyle.Solid, 1f, ptS, ptE, null)
					}, bottomElevation3);
					beamCurveInfo3.m_Type = BeamType.BT_Land;
					beamCurveInfo3.m_nFloorNum = 2;
					rectStairs.m_listBeamCurve.Add(beamCurveInfo3);
					return;
				}
			}
			else
			{
				if (nRunCount2 == 2)
				{
					LineRunData lineRunData7 = rectStairs.m_listRunData[0];
					LineRunData lineRunData8 = rectStairs.m_listRunData[1];
					XYZ xyz7 = new XYZ(0.0, -num, 0.0);
					XYZ xyz8 = new XYZ(-lineRunData8.RiserThickness, 0.0, 0.0);
					ptS = ptLandOutSide0 + xyz7;
					ptE = lineRunData8.PtRunBottomLeft + xyz7 + xyz8;
					double bottomElevation4 = lineRunData7.BottomElevation;
					BeamCurveInfo beamCurveInfo4 = new BeamCurveInfo(new List<CurveInfo>
					{
						base.NewLine(PenColor.PC_Gray, DashStyle.Solid, 1f, ptS, ptE, null)
					}, bottomElevation4);
					beamCurveInfo4.m_Type = BeamType.BT_Land;
					beamCurveInfo4.m_nFloorNum = 0;
					rectStairs.m_listBeamCurve.Add(beamCurveInfo4);
					return;
				}
				if (nRunCount2 == 3)
				{
					LineRunData lineRunData9 = rectStairs.m_listRunData[0];
					LineRunData lineRunData10 = rectStairs.m_listRunData[1];
					LineRunData lineRunData11 = rectStairs.m_listRunData[2];
					XYZ xyz9 = new XYZ(-num, 0.0, 0.0);
					XYZ xyz10 = new XYZ(0.0, lineRunData11.RiserThickness, 0.0);
					ptS = ptLandOutSide1 + xyz9;
					ptE = lineRunData11.PtRunBottomLeft + xyz9 + xyz10;
					double bottomElevation5 = lineRunData10.BottomElevation;
					BeamCurveInfo beamCurveInfo5 = new BeamCurveInfo(new List<CurveInfo>
					{
						base.NewLine(PenColor.PC_Gray, DashStyle.Solid, 1f, ptS, ptE, null)
					}, bottomElevation5);
					beamCurveInfo5.m_Type = BeamType.BT_Land;
					beamCurveInfo5.m_nFloorNum = 0;
					rectStairs.m_listBeamCurve.Add(beamCurveInfo5);
					xyz9 = new XYZ(0.0, -num, 0.0);
					xyz10 = new XYZ(-lineRunData10.RiserThickness, 0.0, 0.0);
					ptS = ptLandOutSide0 + xyz9;
					ptE = lineRunData10.PtRunBottomLeft + xyz9 + xyz10;
					bottomElevation5 = lineRunData9.BottomElevation;
					beamCurveInfo5 = new BeamCurveInfo(new List<CurveInfo>
					{
						base.NewLine(PenColor.PC_Gray, DashStyle.Solid, 1f, ptS, ptE, null)
					}, bottomElevation5);
					beamCurveInfo5.m_Type = BeamType.BT_Land;
					beamCurveInfo5.m_nFloorNum = 1;
					rectStairs.m_listBeamCurve.Add(beamCurveInfo5);
					return;
				}
				if (nRunCount2 == 4)
				{
					LineRunData lineRunData12 = rectStairs.m_listRunData[0];
					LineRunData lineRunData13 = rectStairs.m_listRunData[1];
					LineRunData lineRunData14 = rectStairs.m_listRunData[2];
					LineRunData lineRunData15 = rectStairs.m_listRunData[3];
					XYZ xyz11 = new XYZ(0.0, num, 0.0);
					XYZ xyz12 = new XYZ(lineRunData15.RiserThickness, 0.0, 0.0);
					ptS = ptLandOutSide2 + xyz11;
					ptE = lineRunData15.PtRunBottomLeft + xyz11 + xyz12;
					double bottomElevation6 = lineRunData14.BottomElevation;
					BeamCurveInfo beamCurveInfo6 = new BeamCurveInfo(new List<CurveInfo>
					{
						base.NewLine(PenColor.PC_Gray, DashStyle.Solid, 1f, ptS, ptE, null)
					}, bottomElevation6);
					beamCurveInfo6.m_Type = BeamType.BT_Land;
					beamCurveInfo6.m_nFloorNum = 0;
					rectStairs.m_listBeamCurve.Add(beamCurveInfo6);
					xyz11 = new XYZ(-num, 0.0, 0.0);
					xyz12 = new XYZ(0.0, lineRunData14.RiserThickness, 0.0);
					ptS = ptLandOutSide1 + xyz11;
					ptE = lineRunData14.PtRunBottomLeft + xyz11 + xyz12;
					bottomElevation6 = lineRunData13.BottomElevation;
					beamCurveInfo6 = new BeamCurveInfo(new List<CurveInfo>
					{
						base.NewLine(PenColor.PC_Gray, DashStyle.Solid, 1f, ptS, ptE, null)
					}, bottomElevation6);
					beamCurveInfo6.m_Type = BeamType.BT_Land;
					beamCurveInfo6.m_nFloorNum = 1;
					rectStairs.m_listBeamCurve.Add(beamCurveInfo6);
					xyz11 = new XYZ(0.0, -num, 0.0);
					xyz12 = new XYZ(-lineRunData13.RiserThickness, 0.0, 0.0);
					ptS = ptLandOutSide0 + xyz11;
					ptE = lineRunData13.PtRunBottomLeft + xyz11 + xyz12;
					bottomElevation6 = lineRunData12.BottomElevation;
					beamCurveInfo6 = new BeamCurveInfo(new List<CurveInfo>
					{
						base.NewLine(PenColor.PC_Gray, DashStyle.Solid, 1f, ptS, ptE, null)
					}, bottomElevation6);
					beamCurveInfo6.m_Type = BeamType.BT_Land;
					beamCurveInfo6.m_nFloorNum = 2;
					rectStairs.m_listBeamCurve.Add(beamCurveInfo6);
				}
			}
		}

		private void DrawRectangleAngleStarisNoteInfo(ref RectangleAngleStairs rectStairs, bool bClockWise, XYZ ptLandTL, XYZ ptLandTR, XYZ ptLandBR, XYZ ptLandBL)
		{
			LineRunData lineRunData = rectStairs.m_listRunData.ElementAt(0);
			LineRunData lineRunData2 = rectStairs.m_listRunData.ElementAt(1);
			LineRunData lineRunData3 = null;
			LineRunData lineRunData4 = null;
			if (3 <= rectStairs.m_nRunCount)
			{
				lineRunData3 = rectStairs.m_listRunData.ElementAt(2);
			}
			if (4 <= rectStairs.m_nRunCount)
			{
				lineRunData4 = rectStairs.m_listRunData.ElementAt(3);
			}
			XYZ xyz = XYZ.BasisY * 2.0;
			XYZ xyz2 = XYZ.BasisX * 2.0;
			XYZ ptStart;
			XYZ ptEnd;
			if (2 == rectStairs.m_nRunCount || 3 == rectStairs.m_nRunCount)
			{
				ptStart = ptLandTL - XYZ.BasisX * 4.0;
				ptEnd = lineRunData.PtRunBottomLeft - XYZ.BasisX * 4.0;
			}
			else
			{
				ptStart = ptLandTL - XYZ.BasisX * 4.0;
				ptEnd = ptLandBL - XYZ.BasisX * 4.0;
			}
			base.DrawStairsNoteInfo(ref rectStairs.m_listOtherCurve, ref rectStairs.m_listText, ptStart, ptEnd, "梯间宽度", 0.8, 2.0, 5.0, 4, null);
			if (2 == rectStairs.m_nRunCount)
			{
				ptStart = ptLandTL + xyz;
				ptEnd = lineRunData2.PtRunTopLeft + xyz;
			}
			else
			{
				ptStart = ptLandTL + xyz;
				ptEnd = ptLandTR + xyz;
			}
			base.DrawStairsNoteInfo(ref rectStairs.m_listOtherCurve, ref rectStairs.m_listText, ptStart, ptEnd, "梯间长度", 0.8, 5.0, 2.0, 4, null);
			ptStart = lineRunData.PtRunTopLeft - XYZ.BasisX * 1.0;
			ptEnd = lineRunData.PtRunTopLeft - XYZ.BasisY * lineRunData.TreadDepth - XYZ.BasisX * 1.0;
			base.DrawStairsNoteInfo(ref rectStairs.m_listOtherCurve, ref rectStairs.m_listText, ptStart, ptEnd, "踏步宽度", 0.8, 2.0, 5.0, 4, null);
			double dBoxWidth = 5.0;
			double dBoxHeight = 2.0;
			XYZ vecTextTrans = null;
			if (2 == rectStairs.m_nRunCount)
			{
				if (bClockWise)
				{
					ptStart = lineRunData.PtRunBottomLeft - xyz;
					ptEnd = lineRunData.PtRunBottomRight - xyz;
					dBoxWidth = 5.0;
					dBoxHeight = 2.0;
					vecTextTrans = -XYZ.BasisY;
				}
				else
				{
					ptStart = lineRunData2.PtRunTopLeft + xyz2;
					ptEnd = lineRunData2.PtRunTopRight + xyz2;
					dBoxWidth = 2.0;
					dBoxHeight = 5.0;
					vecTextTrans = XYZ.BasisX;
				}
			}
			else if (3 == rectStairs.m_nRunCount)
			{
				if (bClockWise)
				{
					ptStart = lineRunData.PtRunBottomLeft - xyz;
					ptEnd = lineRunData.PtRunBottomRight - xyz;
					dBoxWidth = 5.0;
					dBoxHeight = 2.0;
				}
				else
				{
					ptStart = lineRunData3.PtRunTopLeft - xyz;
					ptEnd = lineRunData3.PtRunTopRight - xyz;
					dBoxWidth = 5.0;
					dBoxHeight = 2.0;
				}
			}
			else if (4 == rectStairs.m_nRunCount)
			{
				if (bClockWise)
				{
					ptStart = ptLandBL - xyz;
					ptEnd = ptLandBL + XYZ.BasisX * lineRunData.RunWidth - xyz;
					dBoxWidth = 5.0;
					dBoxHeight = 2.0;
				}
				else
				{
					ptStart = ptLandBR + xyz2;
					ptEnd = ptLandBR + XYZ.BasisY * lineRunData4.RunWidth + xyz2;
					dBoxWidth = 2.0;
					dBoxHeight = 5.0;
					vecTextTrans = XYZ.BasisX;
				}
			}
			else
			{
				ptStart = ptLandBL - xyz;
				ptEnd = ptLandBL + XYZ.BasisX * lineRunData.RunWidth - xyz;
			}
			base.DrawStairsNoteInfo(ref rectStairs.m_listOtherCurve, ref rectStairs.m_listText, ptStart, ptEnd, "一跑宽度", 0.8, dBoxWidth, dBoxHeight, 4, vecTextTrans);
			if (2 == rectStairs.m_nRunCount)
			{
				if (bClockWise)
				{
					ptStart = lineRunData2.PtRunTopLeft + xyz2;
					ptEnd = lineRunData2.PtRunTopRight + xyz2;
					dBoxWidth = 2.0;
					dBoxHeight = 5.0;
					vecTextTrans = XYZ.BasisX;
				}
				else
				{
					ptStart = lineRunData.PtRunBottomLeft - xyz;
					ptEnd = lineRunData.PtRunBottomRight - xyz;
					dBoxWidth = 5.0;
					dBoxHeight = 2.0;
					vecTextTrans = -XYZ.BasisY;
				}
			}
			else if (4 == rectStairs.m_nRunCount)
			{
				if (bClockWise)
				{
					ptStart = ptLandTR + xyz2;
					ptEnd = ptLandTR - XYZ.BasisY * lineRunData2.RunWidth + xyz2;
					dBoxWidth = 2.0;
					dBoxHeight = 5.0;
				}
				else
				{
					ptStart = ptLandBR - xyz;
					ptEnd = ptLandBR - XYZ.BasisX * lineRunData3.RunWidth - xyz;
					dBoxWidth = 5.0;
					dBoxHeight = 2.0;
					vecTextTrans = -XYZ.BasisY;
				}
			}
			else
			{
				ptStart = ptLandTR + xyz2;
				ptEnd = ptLandTR - XYZ.BasisY * lineRunData2.RunWidth + xyz2;
				dBoxWidth = 2.0;
				dBoxHeight = 5.0;
			}
			base.DrawStairsNoteInfo(ref rectStairs.m_listOtherCurve, ref rectStairs.m_listText, ptStart, ptEnd, "二跑宽度", 0.8, dBoxWidth, dBoxHeight, 4, vecTextTrans);
			if (3 == rectStairs.m_nRunCount)
			{
				if (bClockWise)
				{
					ptStart = lineRunData3.PtRunTopLeft - xyz;
					ptEnd = lineRunData3.PtRunTopRight - xyz;
				}
				else
				{
					ptStart = lineRunData.PtRunBottomLeft - xyz;
					ptEnd = lineRunData.PtRunBottomRight - xyz;
				}
				base.DrawStairsNoteInfo(ref rectStairs.m_listOtherCurve, ref rectStairs.m_listText, ptStart, ptEnd, "三跑宽度", 0.8, 5.0, 2.0, 4, null);
			}
			else if (4 == rectStairs.m_nRunCount)
			{
				if (bClockWise)
				{
					ptStart = ptLandBR - xyz;
					ptEnd = ptLandBR - XYZ.BasisX * lineRunData3.RunWidth - xyz;
					base.DrawStairsNoteInfo(ref rectStairs.m_listOtherCurve, ref rectStairs.m_listText, ptStart, ptEnd, "三跑宽度", 0.8, 5.0, 2.0, 4, null);
				}
				else
				{
					ptStart = ptLandTR + xyz2;
					ptEnd = ptLandTR - XYZ.BasisY * lineRunData2.RunWidth + xyz2;
					base.DrawStairsNoteInfo(ref rectStairs.m_listOtherCurve, ref rectStairs.m_listText, ptStart, ptEnd, "三跑宽度", 0.8, 2.0, 5.0, 4, XYZ.BasisX);
				}
			}
			if (4 == rectStairs.m_nRunCount)
			{
				if (bClockWise)
				{
					ptStart = ptLandBR + xyz2;
					ptEnd = ptLandBR + XYZ.BasisY * lineRunData4.RunWidth + xyz2;
					base.DrawStairsNoteInfo(ref rectStairs.m_listOtherCurve, ref rectStairs.m_listText, ptStart, ptEnd, "四跑宽度", 0.8, 2.0, 5.0, 4, null);
					return;
				}
				ptStart = ptLandBL - xyz;
				ptEnd = ptLandBL + XYZ.BasisX * lineRunData.RunWidth - xyz;
				base.DrawStairsNoteInfo(ref rectStairs.m_listOtherCurve, ref rectStairs.m_listText, ptStart, ptEnd, "四跑宽度", 0.8, 5.0, 2.0, 4, -XYZ.BasisY);
			}
		}
	}
}
